class UrlRecordMiddelWare(object):
    exclude_url = [
            '/user/login/', '/user/login_check/',
            '/user/register/', '/user/register_check/'
    ]

    def process_view(self, request, view_func, *args, **kwargs):
        if request.path not in UrlRecordMiddelWare.exclude_url and request.is_ajax() is False:
            print(request.get_full_path())
            request.session['pre_path'] = request.get_full_path()


